import QtQuick 2.6
import QtQuick.Layouts 1.2

import "../../Base/UiBase"
import "../../Base/Config"

Rectangle {
    id: root
    color: Color.foreground
    width: parent.width
    height: 350 * Size.ratio
    ColumnLayout {
        anchors.fill: parent
        spacing: 0
        ListView {
            Layout.fillWidth: true
            Layout.preferredHeight: 200 * Size.ratio
            Layout.leftMargin: 40 * Size.ratio
            Layout.rightMargin: 40 * Size.ratio

            orientation: ListView.Horizontal
            spacing: 35 * Size.ratio
            delegate: Rectangle {
                width: 100 * Size.ratio
                height: 200 * Size.ratio
                Column {
                    anchors.fill: parent
                    HeadHolder {
                        SvgzImage {
                            width: 90 * Size.ratio
                            height: 90 * Size.ratio
                            source: model.image
                        }
                    }
                    Text {
                        anchors.horizontalCenter: parent.horizontalCenter
                        font.pixelSize: Size.font26
                        color: Color.input
                        text: model.text
                    }
                }
            }
            model: ListModel {
                id:listmodel
                ListElement {
                    image: "../../../resources/tests/221ABV2-7.jpg"
                    text: "123123"
                }
                ListElement {
                    image: "../../../resources/tests/221ABV2-7.jpg"
                    text: "asffd"
                }
            }
        }
    }
}
